package com.wishwall.persistence;

/**
 * 
 * @author yavor.gologanov
 *
 */
public class SQLConstants {

	public static final Byte FREE_VALUE = 1;
	
	public static final Byte PAID_VALUE = 0;
	
	public static final Byte ACTIVE_VALUE = 1;
	
	public static final Byte INACTIVE_VALUE = 0;
	
	/**
	 * 
	 * @param active
	 */
	public static void checkActiveValue(Integer active) {
		
		if (active == null) {
			return;
		}
		
		if (active.intValue() == ACTIVE_VALUE.intValue()) {
			return;
		}
		
		if (active.intValue() == INACTIVE_VALUE.intValue()) {
			return;
		}
		
		throw new IllegalArgumentException("The 'active' parameter is not valid! Must be null, 1 or 0");
	}
	
}
